#include <iostream>

using namespace std;

int main()
{
    int n;
    int a;
    int b;

    int s =0;

    cin >> n;

    for (int i =1 ; i < n+1; i++){
        if (n % i == 0){
            cout << i << " ";

        }

    }
    cout << endl;

    for (int k = 1; k < n + 1; k++) {
        if (n % k == 0){
            s = s + 1;
        }   
        
    }

    if (s == 2) {
        cout<<"Yes" <<endl;
    } else {
        cout<<"No" << endl;
    }

    cin >> a >> b;
    cin >> a;
    cin >> b;
 
    cout << a << endl;
    cout << b;
    return 0;
}